<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        p {
            width: 120px;
            height: 120px;
            margin: 0 auto;
            border:1px solid #ccc;
            border-radius: 50%;
            text-align:center;
            line-height:120px;
            font-size: 30px;
        }
        .bengin {
            text-align:center;
            margin-top: 2em;
            cursor: pointer;
        }
        input { 
            margin: 0 auto;
        }
        .input {
            text-align:center;
            margin-top: 1em;
        }
        .input input { 
            padding:0 .5em;
        }
    </style>
</head>
<body>
    <p id="time"></p>
    <div class="bengin" onclick='benginHandler(this)'>开始计时</div>
    <div class="input">
        <input id='input' type="text" placeholder="请输入时间">
    </div>
</body>
    <script>
        var a = 60
        var time = document.getElementById("time");
        // var input = document.getElementById('input')
        time.innerText = a
        // function benginHandler(){
        //     setInterval(function() {
        //         input.value --
        //         time.innerText = input.value;
        //     },1000)
        // }
        // var v = setTimeout(function() {
        //     alert(999)
        // },3000)

        // console.log(window.history)
            // time.onclick = function() {
            //     window.location.assign('http://www.baidu.com')

            // }

            console.log(history)

            time.onclick = function() {
                history.forward()
                // alert(99)
            }
    </script>
</html>